CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(osgVegetation)
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
SET(CMAKE_MODULE_PATH "${osgVegetation_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")

FIND_PACKAGE(OpenSceneGraph REQUIRED osgUtil osgDB osgGA osgText osgShadow osgViewer osgSim osgTerrain)
#FIND_PACKAGE(OpenSceneGraph 3.3.8 REQUIRED osgUtil osgDB osgGA osgText osgShadow osgViewer osgSim osgTerrain)

OPTION(OSGV_BUILD_SAMPLES "Build sample" ON)
OPTION(OSGV_BUILD_APPLICATIONS "Build applications" ON)

SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out)

SET(CMAKE_DEBUG_POSTFIX  "_d" CACHE STRING "add a debug postfix, usually d on windows")
ADD_SUBDIRECTORY(osgVegetation)
IF(OSGV_BUILD_APPLICATIONS)
	ADD_SUBDIRECTORY(applications)
ENDIF()
IF(OSGV_BUILD_SAMPLES)
	ADD_SUBDIRECTORY(samples)
ENDIF()
